The invention relates to a device for the attachment of a sensor to the outer periphery of the cylinder barrel of a fluid power drive cylinder, comprising an attachment clamp made up of a clamping member adapted to at least partly fit around said cylinder barrel when said clamp is mounted thereon and of two bracing arms adjoining the ends of the clamping member and adapted to be acted upon by an associated bracing means, and holding face means for cooperation with a peripheral face of the sensor for securing same in position.